import request from '@/utils/request'

const video_baseurl = '/serviceedu/video'

export default{
    //新增小节
    save(video){
        return request({
            url: `${video_baseurl}/save`,
            method: 'post',
            data: video
        })
    },
    //根据ID查询小节
    getById(id){
        return request({
            url: `${video_baseurl}/getById/${id}`,
            method: 'get'
        })
    },
    //更新
    update(video){
        return request({
            url: `${video_baseurl}/update`,
            method: 'post',
            data: video
        })
    },
    //删除
    delete(id){
        return request({
            url: `${video_baseurl}/delete/${id}`,
            method: 'delete'
        })
    },
    //删除视频
    deleteVideo(id){
        return request({
            url: `/vod/video/delete/${id}`,
            method: 'delete'
        })
    }
}